import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
  // 定义状态
  state: {
    station: '',
    previousRoute: null
  },
  mutations: {
    saveStation (state,station) {
      state.station = station
    },
    savePreRoute (state,preRoute) {
      state.previousRoute = preRoute
    }
  }
})

export default store
